<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>用户列表</title>
  <link rel="stylesheet" href="../assets/lib/layui/css/layui.css">
  <link rel="stylesheet" href="../assets/css/user/list.css">
</head>

<body>
  <div class="layui-card">
    <div class="layui-card-header">用户列表</div>
    <div class="layui-card-body">
      <table class="layui-table">
        <colgroup>
          <col width="100">
          <col width="300">
          <col width="180">
          <col width="180">
          <col>
        </colgroup>
        <thead>
          <tr>
            <th>ID</th>
            <th>账号名称</th>
            <th>昵称</th>
            <th>邮箱</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody id="tb">
          <!-- <tr>
            <td>贤心</td>
            <td>贤心</td>
            <td>贤心</td>
            <td>2016-11-29</td>
            <td>
              <button class="layui-btn layui-btn-xs" lay-submit lay-filter="formDemo">编辑</button>
              <button class="layui-btn layui-btn-danger layui-btn-xs" lay-submit lay-filter="formDemo">删除</button>
              <button type="reset" class="layui-btn  layui-btn-normal layui-btn-xs">重置密码</button>
            </td>
          </tr> -->
        </tbody>
      </table>
      <!-- 分页 -->
      <div id="page"></div>
    </div>
  </div>

  <!-- 用户列表 模板引擎 -->
  <script type="text/html" id="userListTpl">
   {{each data v i}}
    <tr>
      <td>{{v.id}}</td>
      <td>{{v.username}}</td>
      <td>{{v.nickname}}</td>
      <td>{{v.email}}</td>
      <td>
        <button class="layui-btn layui-btn-xs editBtn" lay-submit lay-filter="formDemo" data-id="{{v.id}}" data-name="{{v.username}}">编辑</button>
        <button class="layui-btn layui-btn-danger layui-btn-xs delBtn" lay-submit lay-filter="formDemo" data-id="{{v.id}}" ></data-id>删除</button>
        <button type="reset" class="layui-btn  layui-btn-normal layui-btn-xs reset" data-id="{{v.id}}">重置密码</button>
      </td>
   </tr>
   {{/each}}
  </script>
  <!-- 重置密码 模板引擎 -->
  <script type="text/html" id="resetTpl">
  <form class="layui-form resetForm"  >
    <div class="layui-form-item">
      <label class="layui-form-label">密码</label>
      <div class="layui-input-block">
        <input type="password" name="password"  required lay-verify="required|pass" placeholder="请输入新密码" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <label class="layui-form-label">确认密码</label>
      <div class="layui-input-block">
        <input type="password" name="repassword" required lay-verify="required|pass|newPass" placeholder="请重复输入新密码" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-form-item">
      <div class="layui-input-block">
        <button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
      </div>
    </div>
  </form>
  </script>
  <script src="../assets/lib/layui/layui.all.js"></script>
  <script src="../assets/lib/jquery.js"></script>
  <script src="../assets/lib/template-web.js"></script>
  <script src="../assets/js/common.js"></script>
  <script src="../assets/js/user/user.js"></script>
</body>

</html>